<?php

namespace backend\assets;

use yii\web\AssetBundle;

/**
 * Main backend application asset bundle.
 */
class AppAsset extends AssetBundle
{
    public $basePath = '@webroot';
    public $baseUrl = '@web';
    //全局css
    public $css = [
        // 'modules/css/bootstrap.min14ed.css?v=3.3.6',
        // 'modules/css/font-awesome.min93e3.css?v=4.4.0',
        // 'modules/css/animate.min.css',
        // 'modules/css/plugins/dataTables/dataTables.bootstrap.css',
        // 'modules/css/style.min862f.css?v=4.1.0',
        // 'modules/css/wxq.css',
        // 'modules/css/dyl.css',
    ];

    //全局js
    public $js = [
        // '/static/sea.js',
        // 'modules/js/bootstrap.min.js?v=3.3.6',
        // 'modules/js/plugins/dataTables/jquery.dataTables.js', //表格
        // 'modules/js/plugins/dataTables/dataTables.bootstrap.js', //表格
        // 'modules/js/plugins/jeditable/jquery.jeditable.js', //表格
        // 'modules/js/content.min.js?v=1.0.0', //表格
        // 'modules/js/plugins/layer/layer.min.js', 
        // seajs
    ];


    //依赖关系
    public $depends = [
        'yii\web\YiiAsset',
        'yii\bootstrap\BootstrapAsset',
    ];

    //定义按需加载JS方法，注意加载顺序在最后
    public static function addScript($view, $jsFile) {
       $view->registerJsFile($jsFile, [AppAsset::className(), 'depends' => 'backend\assets\AppAsset']);
    }

    //定义按需加载css方法，注意加载顺序在最后
    public static function addCss($view, $cssFile) {
        $view->registerCssFile($cssFile, [AppAsset::className(), 'depends' => 'backend\assets\AppAsset']);
    }
}
